<%-- 
    Document   : changepass
    Created on : Jan 21, 2013, 5:37:08 AM
    Author     : KAKAIT
--%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page import="model.entity.Account"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<div class="col-main" id="ves-col-main">
						<!-- main content -->
												<div class="my-account"><div class="page-title">
    <h1>Edit Account Information</h1>
</div>
     
             <%
            if(request.getAttribute("message")!=null)
                                              {
                String error = (String)request.getAttribute("message");
            %>
                     <ul class="messages"><li class="error-msg"><ul><li><span>Invalid <%= error %></span></li></ul></li></ul>                           
                                              <%}
        %>  
        <% Account ac = (Account)session.getAttribute("acc"); 
             %> 
<form id="form-validate" method="POST" action="<c:url value="/Userchangepass"><c:param name="username" value="<%= ac.getUsername() %>"></c:param>
                   </c:url>">
    <div class="fieldset">
        <input type="hidden" value="vvx6fgKTS5Nu7B5B" name="form_key">
        <h2 class="legend">Change Password</h2>
        <ul class="form-list">
            <li class="fields">
                <div class="customer-name">
    <div class="field name-firstname">
        <label class="required" for="firstname"><em>*</em>First Name</label>
        <div class="input-box">
            <input type="text" class="input-text required-entry" maxlength="255" title="First Name" value="<%= ac.getFirstname().toString() %>" name="firstname" id="firstname">
        </div>
    </div>
    <div class="field name-lastname">
        <label class="required" for="lastname"><em>*</em>Last Name</label>
        <div class="input-box">
            <input type="text" class="input-text required-entry" maxlength="255" title="Last Name" value="<%= ac.getLastname().toString() %>" name="lastname" id="lastname">
        </div>
    </div>
</div>
            </li>
            
            <li>
                <label class="required" for="current_password"><em>*</em>Current Password</label>
                <div class="input-box">
                    <input type="password" id="current_password" name="current_password" class="input-text required-entry" title="Current Password" value="<%= ac.getPassword().toString() %>">
                </div>
            </li>
            <li class="fields">
                <div class="field">
                    <label class="required" for="password"><em>*</em>New Password</label>
                    <div class="input-box">
                        <input type="password" id="password" name="password" class="input-text validate-password required-entry" title="New Password">
                    </div>
                </div>
                <div class="field">
                    <label class="required" for="confirmation"><em>*</em>Confirm New Password</label>
                    <div class="input-box">
                        <input type="password" id="confirmation" name="confirmation" class="input-text validate-cpassword required-entry" title="Confirm New Password">
                    </div>
                </div>
            </li>
        </ul>
    </div>
    <div class="buttons-set">
        <p class="required">* Required Fields</p>
        <p class="back-link"><a href="<c:url value="/myaccountdashboard" />"><small>« </small>Back</a></p>
        <button class="button" title="Save" type="submit"><span><span>Save</span></span></button>
    </div>
</form>
<script type="text/javascript">
//&lt;![CDATA[
    var dataForm = new VarienForm('form-validate', true);
    window.document.title ="Change Pass";
    function setPasswordForm(arg){
        if(arg){
            $('current_password').up(3).show();
            $('current_password').addClassName('required-entry');
            $('password').addClassName('required-entry');
            $('confirmation').addClassName('required-entry');

        }else{
            $('current_password').up(3).hide();
            $('current_password').removeClassName('required-entry');
            $('password').removeClassName('required-entry');
            $('confirmation').removeClassName('required-entry');
        }
    }
            setPasswordForm(true);
    //]]&gt;
</script></div>						<!-- end main content -->		
						
												
					</div>